import axios from '@/axios';
import qs from 'qs';

export const GET = ({url, params}) => {
  return axios.get(url, {params, paramsSerializer: (params) => {
    return qs.stringify(params, { indices: false });
  }});
}

export const POST = ({url, params, data}) => {
  return axios.post(url, data, {params});
}

export const PUT = ({url, params, data}) => {
  return axios.put(url, data, {params});
}

export const DELETE = ({url, params}) => {
  return axios.delete(url, {params});
}
